/*
** list.h for liblist in /home/guina_b/
** 
** Made by benoit guina
** Login   <guina_b@epitech.net>
** 
** Started on  Fri Jan 01 00:00:00 2010 benoit guina
** Last update Sat Dec  4 22:51:44 2010 benoit guina
*/

#ifndef H_LIST
#define H_LIST

void	*list_add(void **l, void *node);
void	*list_append(void **l, void *node);
void	list_apply(void *l, void (*f)(void *));
void	list_apply1(void *l, void (*f)(void *, void *p1), void *p1);
void	list_apply2(void *l, void (*f)(void *, void *p1, void *p2),
		    void *p1, void *p2);
int	list_apply_r(void *l, int (*f)(void *));
int	list_apply1_r(void *l, int (*f)(void *, void *p1), void *p1);
int	list_apply2_r(void *l, int (*f)(void *, void *p1, void *p2),
		      void *p1, void *p2);
void	*list_get(void *l, int n);
void	*list_remove(void **l, void *node);
void	*list_reverse(void *l);
int	list_size(void *l);
void	*list_sort(void **l, int (*cmp)(void *, void *));
void	*list_sorted_merge(void *a, void *b, int (*c)(void *, void *));
void	*list_split(void **l, int n);

#endif
